{include file=comm/head.html}
{include file=comm/top.html}
<link href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
<script src="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/3.3.5/js/bootstrap.min.js"></script>
<link type="text/css" href="{pboot:sitetplpath}/skin/datetimepicker/css/bootstrap-datetimepicker.min.css" rel="stylesheet">
<script type="text/javascript" src="{pboot:sitetplpath}/skin/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="{pboot:sitetplpath}/skin/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"></script>
<script type="text/javascript" src="{pboot:sitetplpath}/skin/datetimepicker/js/format.js"></script>
<script type="text/javascript" charset="utf-8" src="{CORE_DIR}/extend/ueditor/ueditor.config.js?v=v3.0.2"></script>
<script type="text/javascript" charset="utf-8" src="{CORE_DIR}/extend/ueditor/ueditor.all.min.js?v=v2.0.1"> </script>
<script type="text/javascript" charset="utf-8" src="{CORE_DIR}/extend/ueditor/lang/zh-cn/zh-cn.js?v=1.3.5"></script>
<style>ul{margin-bottom: 0;}</style>
<div class="section">
    <div class="container">
        <div class="ct2 clearfix">
            {include file=member/left.html}
            <div class="ct2-mn">
                {include file=comm/position.html}
                <div class="content-body">
                    <table class="table">
                        <thead>
                            <th>序号</th>
                            <th>标题</th>
                            <th>状态</th>
                            <th>投稿时间</th>
                            <th>操作</th>
                        </thead>
                        <tbody>
                            <!-- filter=*|x,y 数据过滤，非必填，用于对列表内容进行过滤筛选，如：filter=title|ASP,PHP 只显示标题含有ASP和PHP的内容 -->
                            <!-- lfield="a,b" （V2.0.5新增）限制列表数据查询字段，提高大数据性能，如lfield="title,content" -->
                            <!-- fuzzy=*  是否模糊匹配，非必填，可选1或0，1时为默认的模糊匹配，0则关闭 -->
                            {pboot:list scode=0 num=10 page=1 isfront=1 filter=create_user|{user:username} fuzzy=0}
                            <tr>
                                <td>[list:i]</td>
                                <td>[list:title]-{user:useremail}-{user:username}</td>
                                <td>{pboot:if([list:status]==1)}已审核{else}<span style="color:red">待审核</span>{/pboot:if}</td>
                                <td>[list:date]</td>
                                <td>{pboot:if([list:status]==1)}<a href="[list:link]" target="_blank">查看</a>{else}<span style="color:#999" title="等待审核通过">查看</span>{/pboot:if}</td>
                            </tr>
                            {/pboot:list}
                        </tbody>
                    </table>
                    {include file=comm/page.html}
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    $(".del").on("click", function() {
    
        if (!confirm("您确定要删除么？")) {
            return;
        }
    
        var url = $(this).data('url');
        var el = $(this).parents("tr");
        $.ajax({
            type: 'GET',
            url: url,
            dataType: 'json',
            success: function(response, status) {
                if (response.code == 0) {
                    alert(response.data);
                } else {
                    el.remove();
                }
            },
            error: function(xhr, status, error) {
                alert('返回数据异常！');
            }
        });
    });
    </script>
{include file=comm/foot.html}